package repository

import (
	"zy11/global"
	"zy11/model"
)

func LoginUser(mobile string) (user model.User, err error) {
	err = global.DB.Where("mobile = ?", mobile).Find(&user).Limit(1).Error
	if err != nil {
		return model.User{}, err
	}
	return user, nil
}
